package org.example.aienglishapp.mapper.article;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.aienglishapp.entity.article.Translation;

import java.util.List;

@Mapper
public interface TranslationMapper {

    void insertTranslation(Translation translation);

    void updateTranslation(Translation translation);

    void deleteTranslationById(@Param("id") Long id);

    void deleteTranslationByArticleId(@Param("articleId") Long articleId);

    Translation getTranslationById(@Param("id") Long id);

    List<Translation> getAllTranslations();

    Translation getTranslationByArticleId(@Param("articleId") Long articleId);

}